<div>
  <div style="overflow: auto;" class="GridView">
    <div style="overflow: auto;" class="GridView" id="SearchFilterListView">
      <div>
        <div style="" class="TitleBarView">
          <h1><?php echo $this->navText;?></h1>
        </div>
      </div>
<div>
  <div style="overflow: auto;" class="SecuredEditAndDetailsView EditAndDetailsView DetailsView ModelView ConfigurableMetadataView MetadataView" id="LeadEditAndDetailsView">
    <div class="wide form">
        <?php $form=$this->beginWidget('CActiveForm', array(
                'id'=>'section-create-form',
                'enableAjaxValidation'=>false,
        )); ?>
      <div class="view-toolbar">
          <?php echo CHtml::link('取消', array('index', 'bookFlag'=>$bookFlag, 'chapterFlag'=>$chapterFlag));?>&nbsp;|&nbsp;
          <?php echo CHtml::link('编辑此段', array('update', 'bookFlag'=>$bookFlag, 'chapterFlag'=>$chapterFlag, 'sectionId'=>$sectionId));?>&nbsp;|&nbsp;
          <?php echo CHtml::submitButton('翻译'); ?>
          <?php echo $form->hiddenField($sectionFormModel,'translateId', array('value'=>$sectionFormModel->translateId)); ?>
        </div>
        <table>
          <colgroup>
          <col style="width:20%">
          <col style="width:30%">
          <col style="width:20%">
          <col style="width:30%">
          </colgroup>
          <tbody>
            <tr>
              <th><?php echo $form->labelEx($sectionFormModel,'sectionText'); ?></th>
              <td colspan="1"><?php echo $form->textArea($sectionFormModel,'sectionText',array('rows'=>10, 'cols'=>40)); ?><?php echo $form->error($sectionFormModel,'sectionText'); ?></td>
              <th><?php echo $form->labelEx($sectionFormModel,'originalSection'); ?></th>
              <td colspan="1"><?php echo $form->textArea($sectionFormModel,'originalSection',array('rows'=>10, 'cols'=>40, 'disabled'=>true)); ?><?php echo $form->error($sectionFormModel,'originalSection'); ?></td>
            </tr>
            <tr>
              <th>历史版本</th>
              <td colspan="3">
              <?php if ($tranlsatesHistory!==false) :?>
              <?php 	foreach ($tranlsatesHistory as $th) :?>
              <p>
              <span style="width:50px;"><?php echo $th['translateId']==$sectionFormModel->translateId? '√' : '';?>&nbsp;</span>
              <span style="width:100px;"><?php echo date("Y-m-d H:i:s", $th['addTime'])?>&nbsp;</span>
              <span style="width:100px;"><?php echo CHtml::encode($th['userName']);?>&nbsp;</span>
              <span style="width:200px;">
              <?php 
              		echo CHtml::ajaxLink(
		                  		'查看', 
		                  		array('section/translateView', 'bookFlag'=>$bookFlag, 'chapterFlag'=>$chapterFlag, 'translateId'=> $th['translateId']),
		                  		array('success'=>'js:function(html){ jQuery("#translate_preview").html(html);	jQuery("#translate_preview").dialog("open"); }')
		            );
		      ?> &nbsp; | &nbsp; 
		      <?php 
              		echo CHtml::link(
		                  		'使用此版本', 
		                  		array('section/translateSelect', 'bookFlag'=>$bookFlag, 'chapterFlag'=>$chapterFlag, 'sectionId'=> $th['sectionId'], 'translateId'=> $th['translateId'])
		            );
		      ?>
		      </span>
              <?php 	endforeach; ?>
              </p>
              <?php endif; ?>
              </td>
           </tr>
          </tbody>
        </table>
    </div>
    <?php $this->endWidget(); ?>
  </div>
</div>
</div></div></div>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id'=>'translate_preview', 'options'=>array('maxWidth'=>600, 'minWidth'=>600, 'maxHeight'=>450, 'minHeight'=>450, 'title'=>'查看', 'autoOpen'=>false)));
echo '&nbsp';
$this->endWidget(); 
?>
